<?
set_time_limit(900); // 15 minutes.
if (get_magic_quotes_gpc()) {
    die("Magic qoutes er skrudd på i PHP, dette er dritt. Fiks <em>php_flag magic_quotes_gpc off</em> i .htaccess"); 
}
require_once("config.php");
require_once("Info.php");
require_once("Database.php");
require_once("Lastfm.php");
require_once("Venue.php");
require_once("VenueList.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Caching of lastfm-data for musiceye</title>
</head>
<body>
<h2>Caching of lastfm-data for musiceye</h2>
<form method="post">
	<input type="submit" value="Start" name="submit">
</form>
<br/><br/>
<code>
<?php
if(!empty($_POST['submit'])) {
    $venueList = VenueList::getModel();
    foreach($venueList as $venue) {
        echo "Caching ".$venue['name']."..<br/>";
        $lineup = Venue::parse($venue['id']);
    }
}
?>
</code>
</body>
</html>